import {
	Controller,
	Get,
	Post,
	Body,
	Patch,
	Param,
	Delete,
} from "@nestjs/common";
import { RecordService } from "./record.service";
import { CreateRecordDto } from "./dto/create-record.dto";
import { UpdateRecordDto } from "./dto/update-record.dto";
import { Public } from "@/common/decorators/public.decorator";

@Controller("record")
export class RecordController {
	constructor(private readonly recordService: RecordService) {}

	@Public()
	@Get()
	getAll() {
		return 111;
	}

	@Public()
	@Post("add")
	create(@Body() createRecordDto: CreateRecordDto) {
		return this.recordService.create(createRecordDto);
	}

	@Public()
	@Post("listById")
	getListById(@Body("id") userId: number) {
		return this.recordService.getListById(userId);
	}
}
